﻿@{
    Layout = null;
}
<html>
<body>
    <ul>

        <li>
            <a href="/Student/Home" title="首页"><i class="fa fa-lg fa-fw fa-home"></i><span class="menu-item-parent">首页</span></a>
        </li>
        @{
        
            HyEduOnline.Server.Common.ComTreeNode root = ViewBag.MenuTree;

            if (root.Childrens.Count > 0)
            {

                foreach (var itemNode in root.Childrens)
                {

                    if (itemNode.Childrens.Count > 0)
                    {
                        var url = string.IsNullOrEmpty(itemNode.Url) ? "#" : itemNode.Url;      
            <li>
                <a href="@url"><i class="@itemNode.Tip"></i><span class="menu-item-parent">@itemNode.NodeName</span></a>
                <ul>
                    @{
                        foreach (var itemChild in itemNode.Childrens)
                        {
                               
                        <li>
                            <a href="@itemChild.Url" title="@itemChild.NodeName"><i class="@itemChild.Tip"></i>@itemChild.NodeName</a>
                        </li>
                        
                        }
                    }

                </ul>

            </li>
                    
                    }
                    else
                    {
            
            <li>
                <a href="@itemNode.Url" title="@itemNode.NodeName"><i class="@itemNode.Tip"></i>
                    <span class="menu-item-parent">@itemNode.NodeName</span></a>

            </li>
                    }
                }//end for

            }
            
        }
    </ul>
</body>
</html>
